package org.tis.tools.senior.module.developer.service;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import org.tis.tools.senior.module.developer.controller.request.AgainDeliveryRequest;
import org.tis.tools.senior.module.developer.controller.request.RepealAddRequest;
import org.tis.tools.senior.module.developer.entity.SRepeal;
import org.tis.tools.senior.module.developer.entity.SRepealList;
import org.tis.tools.senior.module.developer.entity.vo.DeliveryProjectDetail;
import org.tis.tools.senior.module.developer.entity.vo.RepealDetail;
import org.tis.tools.senior.module.developer.entity.vo.SProfileDetail;

import java.text.ParseException;
import java.util.List;

/**
 * sRepeal的Service接口类
 * 
 * @author Auto Generate Tools
 * @date 2018/09/26
 */
public interface ISRepealService extends IService<SRepeal>  {

    /**
     * 查询再次投放可投窗口
     */
    SProfileDetail selectPackTime(Integer guidRepeal) throws ParseException;
    /**
     * 生成延期投产申请
     * @param userId
     * @param request
     */
    void addRepealApply(String userId, RepealAddRequest request);

    /**
     * 查询所有延期投产申请
     * @return
     */
    Page<RepealDetail> selectRepealAll(Page<RepealDetail> page, EntityWrapper<RepealDetail> wrapper);

    /**
     * 将延期申请置为延迟成功
     * @param guidRepeal
     */
    void affirmRepealSeccess(String userId, Integer guidRepeal);

    /**
     * 删除延期投产申请
     * @param guidRepeal
     */
    void deleteRepeal(Integer guidRepeal);

    /**
     * 查询此延期申请要重新投放的代码明细
     * @param guidRepeal
     * @return
     */
    Page<SRepealList> selectRepealListDetail(Integer guidRepeal,
                                             Page<SRepealList> page, EntityWrapper<SRepealList> wrapper);

    /**
     * 延期投产申请再次投放
     * @param userId
     * @param request
     */
    void againDelivery(String userId, AgainDeliveryRequest request) throws ParseException;

    /**
     * 查询此延迟投产申请详情
     * @param guidRepeal
     * @return
     */
    List<DeliveryProjectDetail> selectRepealListDetail(Integer guidRepeal);
}

